<%@ Control Language="C#" AutoEventWireup="true" CodeFile="SearchBox.ascx.cs" Inherits="pages_SearchBox" %>
<script type="text/javascript" >    
    function search_tours(){   
    var loc=document.getElementById("<%=cmbLocation.ClientID%>").value;
    var s=document.getElementById("<%=txtSKeyword.ClientID%>").value;
    var price=document.getElementById("<%=txtSPrice.ClientID%>").value;
    var url="";
    url="Search.aspx?mode=tour&loc="+loc.toString();
    url+="&s="+s;
    url+="&"+price;  
    url+="&hash=s_tour";
    window.location.href=url;
    }
    
    function search_hotels(){
    var loc=document.getElementById("<%=cmbLocation.ClientID%>").value;
    var s=document.getElementById("<%=txtHotel.ClientID%>").value;
    var q=document.getElementById("<%=cmbQuantity.ClientID %>").value;
    var url="";
    url="Search.aspx?mode=hotel&loc="+loc.toString();
    url+="&s="+s;
    url+="&q="+q;
    url+="&active=s_hotel"; //set hotel tab is the active one in search box
    window.location.href=url;
    }
    
    function search_restaurants(){
    var loc=document.getElementById("<%=cmbLocation.ClientID%>").value;
    var s=document.getElementById("<%=txtRestaurant.ClientID%>").value;
    var url="Search.aspx?mode=restaurant&loc=";
    url+=loc;
    url+="&s=";
    url+=s;
    url+="&active=s_res";
    window.location.href=url;
    }
</script>
<script type="text/javascript" language="javascript">
$(document).ready(function(){
$('#<%=GetActiveTab() %>').click();

});
</script>
<style type="text/css">
#slider4{
margin:0px;
line-height:27px;
}
#slider4 .pager, .viewport .overview{
list-style-type:none;
padding:0;
text-align:left;
}
#slider4 .viewport{
display:block;
width:200px;
height:180px;
margin-left:5px;
overflow:hidden;
}
#slider4  .viewport .overview{
padding:0;
}
#slider4  .viewport .overview li{
display:block;
width:200px;
height:100px;
float:left;
}
#slider4 .pager{
margin-left:15px;

}
#slider4 .pager li{
display:inline;
}
#slider4 .pager li a{
display:block;
float:left;
padding:3px;
font-weight:bold;
}
#slider4 .pager .active{
color:#003399;
}
#slider4 select, #slider4 input[type="text"]{
width:120px;
}
.location_box{
margin-left:50px;
}
</style>
<ul class="pager">
	<li><a id="s_tour" href='#' class="pagenum active" rel="0">Tour</a></li>
	<li><a id="s_hotel" href='#' class="pagenum" rel="1">Hotel</a></li>
    <li><a id="s_res" href='#' class="pagenum" rel="2">Restaurant</a></li>
</ul>
<div class="viewport">
<ul class="overview">
    <li class="page">   
        <table>           
            <tr>
                <td><asp:Label ID="Label1" runat="server" Text="Price: " /></td>
                <td><asp:DropDownList ID="txtSPrice" runat="server"></asp:DropDownList></td>
            </tr>
            <tr>
                <td><asp:Label ID="Label2" runat="server" Text="Keyword: " /></td>
                <td><asp:TextBox ID="txtSKeyword" runat="server"></asp:TextBox></td>
            </tr>
            <tr>
                <td></td>
                <td><input type="button" onclick="search_tours();" value="Search" /></td>
                
            </tr>
        </table>
    </li>
    <li class="page">      
    <table> 
        <tr>
            <td><asp:Label ID="lblHotel" runat="server" Text="Name:"></asp:Label></td>
            <td>    <asp:TextBox ID="txtHotel" runat="server"></asp:TextBox></td>
        </tr>
        <tr>
            <td><asp:Label ID="Quantity" runat="server" Text="Quantity"></asp:Label></td>
            <td><asp:DropDownList ID="cmbQuantity" runat="server"></asp:DropDownList>  </td>
        </tr>
        <tr>
                <td></td>
                <td><input type="button" value="Search" onclick="search_hotels();"/></td>
                
            </tr>
    </table>
    </li>
    <li class="page">
        <table>
            <tr>
                <td><asp:Label ID="lblRes" runat="server" Text="Name: "></asp:Label></td>
                <td><asp:TextBox ID="txtRestaurant" runat="server"></asp:TextBox></td>
            </tr>  
            <tr>
                <td></td>
                <td><input type="button" value="Search" onclick="search_restaurants();"/></td>
                
            </tr>          
        </table>
        
    </li>
</ul>
Specify location here:<br />
<asp:DropDownList CssClass="location_box" ID="cmbLocation" runat="server" ></asp:DropDownList>
<br />
<a  href="AdvancedSearch.aspx">Advanced Search &raquo;&raquo;</a>
</div>
